Low-current
Standard
Ultra-high-output
Applications
/* Name : main.c * Purpose : Source code for LED Interfacing with ARM LPC1248. * Author : Gemicates * Date : 2018-08-01 * Website : www.gemicates.org * Revision : None */ #include<lpc21xx.h> //header file for LPC21XX series void delay(int time) //delay function declaration { int i,j; //This function produces a delay in msec for(i=0;i<time;i++) { for(j=0;j<i;j++); } } int main() //main function { PINSEL0=0X00000000; //select PORT0 as GPIO mode IO0DIR=0XFFFFFFFF; //make PORT0 pin as Output mode while(1) //Repeat(loop) forever { IO0SET=0X55555555; //Set the PORT0 pins delay(900); //hault for sometime IO0CLR=0X55555555; //clear the PORT0 pins IO0SET=0XAAAAAAAA; //Set the PORT0 pins delay(900); //hault for sometime IO0CLR=0XAAAAAAAA; ` //clear the PORT0 pins } return 0; //return back to main function }